import request from '@/utils/request.js'
// 获取组织架构
export function companyDepartment() {
  return request({
    url: '/company/department'
  })
}
// 获取员工列表
export function sysUserSimple() {
  return request({
    url: '/sys/user/simple'
  })
}
// 新增部门
export function companyDepartmentPost(data, id) {
  if (!id) {
    return request({
      url: '/company/department',
      method: 'post',
      data
    })
  } else {
    return request({
      url: '/company/department/' + id,
      method: 'put',
      data
    })
  }
}

// 根据id删除部门
export function companyDepartmentDel(id) {
  return request({
    url: '/company/department/' + id,
    method: 'delete'
  })
}
